import Vue from "vue";
import Vuex from "vuex";
import state from "./state";
import mutations from "./mutations";
import actions from "./actions";
import getters from "./getters";
import userInfo from "./modules/userInfo";
import login from "./modules/login";
import user from "./modules/user";
import goods from "./modules/goods";
import common from "./modules/common";
// import createPersistedState from "vuex-persistedstate";
// import { localStorage, sessionStorage } from "mp-storage";
Vue.use(Vuex);

export default new Vuex.Store({
  state,
  getters,
  mutations,
  actions,
  modules: {
    userInfo,
    user,
    login,
    common,
    goods,
  },
  // strict: process.env.NODE_ENV !== "production",

  // plugins: [
  //   createPersistedState({
  //     storage: sessionStorage,
  //   }),
  // ],
});
